<template>
  <div> 
    <mt-header fixed title="单项赛集体报名">
      <mt-button icon="back" @click='$router.back(-1)' slot="left"></mt-button>
    </mt-header>
    <div style="height:40px;"></div>   
    <div class="top-title"><i class="gray">比赛名称: </i>2019长沙岳麓区第N届羽毛球邀请赛</div>
    <div class="top-title"><i class="gray">比赛组别：</i>青年组 - 20至30岁</div>  
    <step current=5 :stepArr="stepArr"></step>
    <div>
      <div class="cf m10"><span class="fl f16 fwb mt5">报名预览</span><span class="fl f16 mt5">（男双）</span></div>
      <div  class="team-content">
        <ul class="team-list">
          <li v-for="(item, index) in list" class="reg">            
            <div class="team-item-num"><i>{{index + 1}}</i></div>
            <div class="team-item-in">
              <div v-for="(obj, n) in item" class="team-item-in-line">
                <div class="team-item-c"> 
                  <span style="flex:1">{{ getCertName(obj.certType) }}</span>
                  <span style="flex:1">{{obj.certNo}}</span>
                </div>
                <div class="team-item-c"> 
                  <span style="flex:1">{{obj.name}}</span>
                  <span style="flex:1">{{obj.mobile}}</span>
                </div>
                <div class="team-item-c">  
                  <span style="flex:1">{{obj.age}}岁</span>
                  <span style="flex:1">{{ getSexName(obj.sex) }}</span>        
                </div>
              </div>
            </div>
          </li>
        </ul> 
      </div> 
      <div style="display: flex; margin: 10px;">
        <mt-button style="flex:1;" @click='$router.push("/enroll/team/step4")' plain class="mr10" type="primary">上一步</mt-button>
        <mt-button style="flex:1;" @click='$router.push("/enroll/team/step6")' type="primary">下一步</mt-button>
      </div>
    </div>
  </div>
</template>

<script>
import step from '@/components/step'
import popupAge from '@/components/popupAge'
import popupRadio from '@/components/popupRadio'
export default {
  components:{
    step,popupAge,popupRadio
  },
  data () {
    return {
      stepArr:['选择俱乐部','报名人员','选择项目','选择队员','报名预览','支付完成'],
      certList:[{value:"1",name:"身份证"},{value:"2",name:"学生证"},{value:"3",name:"港澳通行证"},{value:"4",name:"护照"}],
      sexArr:[{value:'male',name:'男'},{value:'female',name:'女'}],
      list:[
         [{'certType':'1','certNo':'430456198810025462','name':'张三','age':'24','sex':'male','mobile':'1394563245'},{'certType':'1','certNo':'430456198810025462','name':'张三','age':'24','sex':'male','mobile':'1394563245'}],
         [{'certType':'1','certNo':'430456198810025462','name':'张三','age':'24','sex':'male','mobile':'1394563245'},{'certType':'1','certNo':'430456198810025462','name':'张三','age':'24','sex':'male','mobile':'1394563245'}]
      ]
    }
  },
  mounted(){
    
  },
  methods:{
    getCertName(t){
      var arr = this.certList;
      var str = '';
      for (var i = 0; i < arr.length; i++) {
        if(arr[i]["value"] == t){
          str = arr[i]["name"];
        }
      }
      return str;
    },    
    getSexName(t){
      var arr = this.sexArr;
      var str = '';
      for (var i = 0; i < arr.length; i++) {
        if(arr[i]["value"] == t){
          str = arr[i]["name"];
        }
      }
      return str;
    }
  }
}
</script>
